package com.service.Authorization;


import com.service.Authorization.annotation.EnableGcFeignClients;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Indexed;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author
 * @version 1.0
 * @date 2020/8/20 15:46
 */
@SpringBootApplication(
        exclude = {org.activiti.spring.boot.SecurityAutoConfiguration.class}
)
@EnableDiscoveryClient
@EnableGcFeignClients
@EnableScheduling
@ServletComponentScan(value = "com.service.config.annotation")
@ComponentScan(basePackages = {"com.service"})
@MapperScan("com.service.Authorization.dao")
@EnableTransactionManagement    //开启事务管理
@EnableAsync(proxyTargetClass=true)    //配置代理为cglib代理，默认使用 的是jdk动态代理
@RefreshScope
@ComponentScan({"springfox.documentation.schema"})
@Indexed
public class AuthorizationApplication {
    public static void main(String[] args) {
        SpringApplication.run(AuthorizationApplication.class);
    }
}
